/*
 * @Author: 受道·谢松樵 xiesongqiao@qingyunzu.com
 * @Date: 2025-09-17 09:05:17
 * @LastEditors: 受道·谢松樵 xiesongqiao@qingyunzu.com
 * @LastEditTime: 2025-09-17 20:40:47
 * @FilePath: /rent_new_pc/apps/rent_qyz_boss/src/api/model/login.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/axios";

// 密码登录
export function LoginByPwd(data = {}) {
  return request.post("/auth-backend/boss/login/captchaLogin", data, { headers: { isToken: false } });
}

// 验证码登录
export function LoginByCode(data = {}) {
  return request.post("/auth-backend/boss/login/smsLogin", data, { headers: { isToken: false } });
}

// 忘记密码
export function ForgetPass(data = {}) {
  return request.post("/auth-backend/boss/user/forgetPass", data, { headers: { isToken: false } });
}

// 获取验证码图片（如果是图片流，按需加 responseType: 'blob'）
export function GetCodeImg() {
  return request.get("/support-backend/captcha/generate", {}, { headers: { isToken: false } });
}

// 发送短信验证码
export function SendSms(data = {}) {
  return request.post("/auth-backend/sms/send", data, { headers: { isToken: false } });
}

// 发送短信类型
export function SendType() {
  return request.get("/auth-backend/sms/sendType", {}, { headers: { isToken: false } });
}

// 修改手机号
export function ChangePhone(data = {}) {
  return request.post("/auth-backend/boss/user/changePhone", data);
}

/**修改手机号发送短信验证码*/
export function SendModifyMobile(data = {}) {
  return request.post("/auth-backend/sms/sendModifyMobile", data);
}
